# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: T.J. Townsend <blakkheim@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Geoffroy Carrier <geoffroy.carrier@koon.fr>
# Contributor: Baptiste Daroussin <baptiste.daroussin@gmail.com>

pkgname=tnftp
pkgver=20230507
pkgrel=2
pkgdesc='NetBSD FTP client with several advanced features'
url='https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/'
arch=('loong64' 'x86_64')
license=('BSD')
depends=('glibc' 'ncurses' 'libncursesw.so' 'openssl')
source=(https://ftp.netbsd.org/pub/NetBSD/misc/tnftp/$pkgname-$pkgver.tar.gz{,.asc})
sha256sums=('be0134394bd7d418a3b34892b0709eeb848557e86474e1786f0d1a887d3a6580'
            'SKIP')
b2sums=('780497f7bad44d3dcc8c22f6075d3d6ea556c641db5a740b63b0e226773a4fa4ba3b9081fbe9d57918f52d1e0d21b96181e6344c35e7ef4bae8d1178264fecb9'
        'SKIP')
validpgpkeys=(
  '2A8E22EDB07B5414548D8507A4186D9A7F332472'  # Luke Mewburn <lukem@NetBSD.org>
)

build() {
  cd "${pkgname}-${pkgver}"
  ./configure \
    --prefix=/usr \
    --with-socks=no \
    --enable-ssl
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
  install -Dm 755 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
  install -Dm 644 ChangeLog INSTALL NEWS README THANKS todo -t "${pkgdir}/usr/share/doc/${pkgname}"
}

# vim: ts=2 sw=2 et:
